// ███╗   ██╗ ██████╗ ████████╗██╗ ██████╗███████╗
// ████╗  ██║██╔═══██╗╚══██╔══╝██║██╔════╝██╔════╝
// ██╔██╗ ██║██║   ██║   ██║   ██║██║     █████╗  
// ██║╚██╗██║██║   ██║   ██║   ██║██║     ██╔══╝  
// ██║ ╚████║╚██████╔╝   ██║   ██║╚██████╗███████╗
// ╚═╝  ╚═══╝ ╚═════╝    ╚═╝   ╚═╝ ╚═════╝╚══════╝
// -----------------------------------------------
//  
// This file is automatically generated 
// Please do not edit these files manually
// Run the following in the root of the repos:
//
// 		*NIX 		:	./build.sh codegen
// 		Windows 	:	build.bat codegen
//
// -----------------------------------------------
// ReSharper disable RedundantUsingDirective
using System;
using System.Collections.Generic;
using System.Collections.Specialized;
using System.Linq;
using System.Text;
using System.Threading;
using System.Threading.Tasks;
using Elasticsearch.Net;
using static Elasticsearch.Net.HttpMethod;

// ReSharper disable InterpolatedStringExpressionIsNotIFormattable
// ReSharper disable once CheckNamespace
// ReSharper disable InterpolatedStringExpressionIsNotIFormattable
// ReSharper disable RedundantExtendsListEntry
namespace Elasticsearch.Net.Specification.TransformApi
{
	///<summary>
	/// Transform APIs.
	/// <para>Not intended to be instantiated directly. Use the <see cref = "IElasticLowLevelClient.Transform"/> property
	/// on <see cref = "IElasticLowLevelClient"/>.
	///</para>
	///</summary>
	public class LowLevelTransformNamespace : NamespacedClientProxy
	{
		internal LowLevelTransformNamespace(ElasticLowLevelClient client): base(client)
		{
		}

		///<summary>DELETE on /_transform/{transform_id} <para>https://www.elastic.co/guide/en/elasticsearch/reference/current/delete-transform.html</para></summary>
		///<param name = "transformId">The id of the transform to delete</param>
		///<param name = "requestParameters">Request specific configuration such as querystring parameters &amp; request specific connection settings.</param>
		public TResponse Delete<TResponse>(string transformId, DeleteTransformRequestParameters requestParameters = null)
			where TResponse : class, IElasticsearchResponse, new() => DoRequest<TResponse>(DELETE, Url($"_transform/{transformId:transformId}"), null, RequestParams(requestParameters));
		///<summary>DELETE on /_transform/{transform_id} <para>https://www.elastic.co/guide/en/elasticsearch/reference/current/delete-transform.html</para></summary>
		///<param name = "transformId">The id of the transform to delete</param>
		///<param name = "requestParameters">Request specific configuration such as querystring parameters &amp; request specific connection settings.</param>
		[MapsApi("transform.delete_transform", "transform_id")]
		public Task<TResponse> DeleteAsync<TResponse>(string transformId, DeleteTransformRequestParameters requestParameters = null, CancellationToken ctx = default)
			where TResponse : class, IElasticsearchResponse, new() => DoRequestAsync<TResponse>(DELETE, Url($"_transform/{transformId:transformId}"), ctx, null, RequestParams(requestParameters));
		///<summary>GET on /_transform/{transform_id} <para>https://www.elastic.co/guide/en/elasticsearch/reference/current/get-transform.html</para></summary>
		///<param name = "transformId">The id or comma delimited list of id expressions of the transforms to get, &#x27;_all&#x27; or &#x27;*&#x27; implies get all transforms</param>
		///<param name = "requestParameters">Request specific configuration such as querystring parameters &amp; request specific connection settings.</param>
		public TResponse Get<TResponse>(string transformId, GetTransformRequestParameters requestParameters = null)
			where TResponse : class, IElasticsearchResponse, new() => DoRequest<TResponse>(GET, Url($"_transform/{transformId:transformId}"), null, RequestParams(requestParameters));
		///<summary>GET on /_transform/{transform_id} <para>https://www.elastic.co/guide/en/elasticsearch/reference/current/get-transform.html</para></summary>
		///<param name = "transformId">The id or comma delimited list of id expressions of the transforms to get, &#x27;_all&#x27; or &#x27;*&#x27; implies get all transforms</param>
		///<param name = "requestParameters">Request specific configuration such as querystring parameters &amp; request specific connection settings.</param>
		[MapsApi("transform.get_transform", "transform_id")]
		public Task<TResponse> GetAsync<TResponse>(string transformId, GetTransformRequestParameters requestParameters = null, CancellationToken ctx = default)
			where TResponse : class, IElasticsearchResponse, new() => DoRequestAsync<TResponse>(GET, Url($"_transform/{transformId:transformId}"), ctx, null, RequestParams(requestParameters));
		///<summary>GET on /_transform <para>https://www.elastic.co/guide/en/elasticsearch/reference/current/get-transform.html</para></summary>
		///<param name = "requestParameters">Request specific configuration such as querystring parameters &amp; request specific connection settings.</param>
		public TResponse Get<TResponse>(GetTransformRequestParameters requestParameters = null)
			where TResponse : class, IElasticsearchResponse, new() => DoRequest<TResponse>(GET, "_transform", null, RequestParams(requestParameters));
		///<summary>GET on /_transform <para>https://www.elastic.co/guide/en/elasticsearch/reference/current/get-transform.html</para></summary>
		///<param name = "requestParameters">Request specific configuration such as querystring parameters &amp; request specific connection settings.</param>
		[MapsApi("transform.get_transform", "")]
		public Task<TResponse> GetAsync<TResponse>(GetTransformRequestParameters requestParameters = null, CancellationToken ctx = default)
			where TResponse : class, IElasticsearchResponse, new() => DoRequestAsync<TResponse>(GET, "_transform", ctx, null, RequestParams(requestParameters));
		///<summary>GET on /_transform/{transform_id}/_stats <para>https://www.elastic.co/guide/en/elasticsearch/reference/current/get-transform-stats.html</para></summary>
		///<param name = "transformId">The id of the transform for which to get stats. &#x27;_all&#x27; or &#x27;*&#x27; implies all transforms</param>
		///<param name = "requestParameters">Request specific configuration such as querystring parameters &amp; request specific connection settings.</param>
		public TResponse GetStats<TResponse>(string transformId, GetTransformStatsRequestParameters requestParameters = null)
			where TResponse : class, IElasticsearchResponse, new() => DoRequest<TResponse>(GET, Url($"_transform/{transformId:transformId}/_stats"), null, RequestParams(requestParameters));
		///<summary>GET on /_transform/{transform_id}/_stats <para>https://www.elastic.co/guide/en/elasticsearch/reference/current/get-transform-stats.html</para></summary>
		///<param name = "transformId">The id of the transform for which to get stats. &#x27;_all&#x27; or &#x27;*&#x27; implies all transforms</param>
		///<param name = "requestParameters">Request specific configuration such as querystring parameters &amp; request specific connection settings.</param>
		[MapsApi("transform.get_transform_stats", "transform_id")]
		public Task<TResponse> GetStatsAsync<TResponse>(string transformId, GetTransformStatsRequestParameters requestParameters = null, CancellationToken ctx = default)
			where TResponse : class, IElasticsearchResponse, new() => DoRequestAsync<TResponse>(GET, Url($"_transform/{transformId:transformId}/_stats"), ctx, null, RequestParams(requestParameters));
		///<summary>POST on /_transform/_preview <para>https://www.elastic.co/guide/en/elasticsearch/reference/current/preview-transform.html</para></summary>
		///<param name = "body">The definition for the transform to preview</param>
		///<param name = "requestParameters">Request specific configuration such as querystring parameters &amp; request specific connection settings.</param>
		public TResponse Preview<TResponse>(PostData body, PreviewTransformRequestParameters requestParameters = null)
			where TResponse : class, IElasticsearchResponse, new() => DoRequest<TResponse>(POST, "_transform/_preview", body, RequestParams(requestParameters));
		///<summary>POST on /_transform/_preview <para>https://www.elastic.co/guide/en/elasticsearch/reference/current/preview-transform.html</para></summary>
		///<param name = "body">The definition for the transform to preview</param>
		///<param name = "requestParameters">Request specific configuration such as querystring parameters &amp; request specific connection settings.</param>
		[MapsApi("transform.preview_transform", "body")]
		public Task<TResponse> PreviewAsync<TResponse>(PostData body, PreviewTransformRequestParameters requestParameters = null, CancellationToken ctx = default)
			where TResponse : class, IElasticsearchResponse, new() => DoRequestAsync<TResponse>(POST, "_transform/_preview", ctx, body, RequestParams(requestParameters));
		///<summary>PUT on /_transform/{transform_id} <para>https://www.elastic.co/guide/en/elasticsearch/reference/current/put-transform.html</para></summary>
		///<param name = "transformId">The id of the new transform.</param>
		///<param name = "body">The transform definition</param>
		///<param name = "requestParameters">Request specific configuration such as querystring parameters &amp; request specific connection settings.</param>
		public TResponse Put<TResponse>(string transformId, PostData body, PutTransformRequestParameters requestParameters = null)
			where TResponse : class, IElasticsearchResponse, new() => DoRequest<TResponse>(PUT, Url($"_transform/{transformId:transformId}"), body, RequestParams(requestParameters));
		///<summary>PUT on /_transform/{transform_id} <para>https://www.elastic.co/guide/en/elasticsearch/reference/current/put-transform.html</para></summary>
		///<param name = "transformId">The id of the new transform.</param>
		///<param name = "body">The transform definition</param>
		///<param name = "requestParameters">Request specific configuration such as querystring parameters &amp; request specific connection settings.</param>
		[MapsApi("transform.put_transform", "transform_id, body")]
		public Task<TResponse> PutAsync<TResponse>(string transformId, PostData body, PutTransformRequestParameters requestParameters = null, CancellationToken ctx = default)
			where TResponse : class, IElasticsearchResponse, new() => DoRequestAsync<TResponse>(PUT, Url($"_transform/{transformId:transformId}"), ctx, body, RequestParams(requestParameters));
		///<summary>POST on /_transform/{transform_id}/_start <para>https://www.elastic.co/guide/en/elasticsearch/reference/current/start-transform.html</para></summary>
		///<param name = "transformId">The id of the transform to start</param>
		///<param name = "requestParameters">Request specific configuration such as querystring parameters &amp; request specific connection settings.</param>
		public TResponse Start<TResponse>(string transformId, StartTransformRequestParameters requestParameters = null)
			where TResponse : class, IElasticsearchResponse, new() => DoRequest<TResponse>(POST, Url($"_transform/{transformId:transformId}/_start"), null, RequestParams(requestParameters));
		///<summary>POST on /_transform/{transform_id}/_start <para>https://www.elastic.co/guide/en/elasticsearch/reference/current/start-transform.html</para></summary>
		///<param name = "transformId">The id of the transform to start</param>
		///<param name = "requestParameters">Request specific configuration such as querystring parameters &amp; request specific connection settings.</param>
		[MapsApi("transform.start_transform", "transform_id")]
		public Task<TResponse> StartAsync<TResponse>(string transformId, StartTransformRequestParameters requestParameters = null, CancellationToken ctx = default)
			where TResponse : class, IElasticsearchResponse, new() => DoRequestAsync<TResponse>(POST, Url($"_transform/{transformId:transformId}/_start"), ctx, null, RequestParams(requestParameters));
		///<summary>POST on /_transform/{transform_id}/_stop <para>https://www.elastic.co/guide/en/elasticsearch/reference/current/stop-transform.html</para></summary>
		///<param name = "transformId">The id of the transform to stop</param>
		///<param name = "requestParameters">Request specific configuration such as querystring parameters &amp; request specific connection settings.</param>
		public TResponse Stop<TResponse>(string transformId, StopTransformRequestParameters requestParameters = null)
			where TResponse : class, IElasticsearchResponse, new() => DoRequest<TResponse>(POST, Url($"_transform/{transformId:transformId}/_stop"), null, RequestParams(requestParameters));
		///<summary>POST on /_transform/{transform_id}/_stop <para>https://www.elastic.co/guide/en/elasticsearch/reference/current/stop-transform.html</para></summary>
		///<param name = "transformId">The id of the transform to stop</param>
		///<param name = "requestParameters">Request specific configuration such as querystring parameters &amp; request specific connection settings.</param>
		[MapsApi("transform.stop_transform", "transform_id")]
		public Task<TResponse> StopAsync<TResponse>(string transformId, StopTransformRequestParameters requestParameters = null, CancellationToken ctx = default)
			where TResponse : class, IElasticsearchResponse, new() => DoRequestAsync<TResponse>(POST, Url($"_transform/{transformId:transformId}/_stop"), ctx, null, RequestParams(requestParameters));
		///<summary>POST on /_transform/{transform_id}/_update <para>https://www.elastic.co/guide/en/elasticsearch/reference/current/update-transform.html</para></summary>
		///<param name = "transformId">The id of the transform.</param>
		///<param name = "body">The update transform definition</param>
		///<param name = "requestParameters">Request specific configuration such as querystring parameters &amp; request specific connection settings.</param>
		public TResponse Update<TResponse>(string transformId, PostData body, UpdateTransformRequestParameters requestParameters = null)
			where TResponse : class, IElasticsearchResponse, new() => DoRequest<TResponse>(POST, Url($"_transform/{transformId:transformId}/_update"), body, RequestParams(requestParameters));
		///<summary>POST on /_transform/{transform_id}/_update <para>https://www.elastic.co/guide/en/elasticsearch/reference/current/update-transform.html</para></summary>
		///<param name = "transformId">The id of the transform.</param>
		///<param name = "body">The update transform definition</param>
		///<param name = "requestParameters">Request specific configuration such as querystring parameters &amp; request specific connection settings.</param>
		[MapsApi("transform.update_transform", "transform_id, body")]
		public Task<TResponse> UpdateAsync<TResponse>(string transformId, PostData body, UpdateTransformRequestParameters requestParameters = null, CancellationToken ctx = default)
			where TResponse : class, IElasticsearchResponse, new() => DoRequestAsync<TResponse>(POST, Url($"_transform/{transformId:transformId}/_update"), ctx, body, RequestParams(requestParameters));
	}
}